package com.liubo.ssepro.Repository;

import com.liubo.ssepro.Entity.TokenEntity;
import com.liubo.ssepro.Entity.UserEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

import java.util.Date;


@Repository
public interface TokenRepository extends JpaRepository<TokenEntity,Integer> {

//    TokenEntity findByMaptoken(String token);
//
//    TokenEntity findByPhone(String phone);


//    @Modifying
//    @Transactional
//    @Query(value = "UPDATE  TokenEntity tk SET tk.maptoken = :maptoken, tk.suat = :suat WHERE tk.phone = :phone")
//    void updateMaptoken(@Param("phone") String phone, @Param("maptoken") String maptoken, @Param("suat") Date suat);
}
